/*
 * @Description:
 * @Author: your name
 * @version:
 * @Date: 2024-05-08 16:11:33
 * @LastEditors: your name
 * @LastEditTime: 2024-06-24 09:33:27
 */
import { defineStore } from "pinia";

export const useMapData = defineStore("lineData", {
  state: () => {
    return {
      viewer: null,
      tileset: null
    };
  },
  getters: {
    Viewer() {
      return this.viewer;
    },
    Tile() {
      return this.tileset;
    }
  },
  actions: {
    setViewer(viewer) {
      return new Promise((resolve, reject) => {
        this.viewer = viewer;
        resolve(viewer);
      });
    },
    setTileset(tileset) {
      return new Promise((resolve, reject) => {
        this.tileset = tileset;
        resolve(tileset);
      });
    }
  },
});

